package com.wwtech.epp.ui.activity.mine.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.mine.SettingActivity;
import com.wwtech.epp.ui.activity.mine.contract.SettingContract;
import com.wwtech.epp.ui.activity.mine.presenter.SettingPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.mine
 * @Description: The moduele of SettingActivity, provide field for SettingActivity
 * @date 2017/08/28 20:21:27
 */
@Module
public class SettingModule {
    private final SettingContract.View mView;


    public SettingModule(SettingContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public SettingPresenter provideSettingPresenter(HttpAPIWrapper httpAPIWrapper, SettingActivity mActivity) {
        return new SettingPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public SettingActivity provideSettingActivity() {
        return (SettingActivity) mView;
    }
}